import React from "react";
import NavigatorConfig from "./NavigatorConfig";



export type NavigatorParams = {
    key: string; // param key
};

export type NavigatorStatesType = {
    root: boolean; // 是否是顶层page
};

export type NavigatorAppStatesType = {
    // selectedTab: string;
    navigator: NavigatorStatesType;
};



export interface INavigator {
    push: (routeKey: string, paramsKV?:any) => void;
    // push: (componentFunc: () => any, viewConfig?: NavigatorViewConfig) => void;
    pop: (cb?:()=>void) => void;
    popToRoot: () => void;
    // register: (pageName: string, component: React.Component<any, any>) => void;
    initConfig: (
        root: React.Component<any, NavigatorAppStatesType> | any,
        containID: string,
        config: NavigatorConfig,
        viewConfigs:any
    ) => React.Component<any, any> | any | void;

    setRootNavigator(navigator:any)
    getRootNavigator()
    setCurrentNavigator(navigator:any)
    getCurrentNavigator()
}
